<template>
  <div class="login_container">
    <div>
      <h1>This is test</h1>
    </div>
    <div class="login_box">
      <div class="avatar_box">
        <img src="../assets/logo.png"
             alt="avatar" />
      </div>
    </div>
    <el-button type="primary"
               @click="login"
               class="btns">返回</el-button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      dialogVisible: false
    }
  },
  methods: {
    login () {
      // 表单预验证
      // valid：bool类型
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
/* // lang="less" 支持less格式
// scoped vue的指令，只在当前组件生效 */
.login_container {
  //background-color: #2b4b6b;
  height: 100%;
}

.btns {
  justify-content: center;
}

.login_box {
  width: 450px;
  height: 360px;
  background-color: #fff;
  border-radius: 3px;
  position: absolute;
  left: 50%;
  top: 50%;
  //-webkit-
  transform: translate(-50%, -50%);
  background-color: #fff;

  .avatar_box {
    width: 130px;
    height: 130px;
    border: 1px solid #eee;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 10px #ddd;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background-color: #eee;
    }
  }
}
</style>
